function plotGPR_3D(x,y,z,x_str,y_str,z_str)

%x = X(:,strcmpi(x_str,meta));
%y = X(:,strcmpi(y_str,meta));
%z = X(:,strcmpi(z_str,meta));

%addpath('gpml-matlab/gpml');

[foo1,foo2] = meshgrid(linspace(min(x),max(x),20),linspace(min(y),max(y),20));
Xtest = [foo1(:),foo2(:)];
[m,n] = size(foo1);

X = [x,y];
y = z;

color_data = [0.4 0.6 1.0];
color_fit = [0.1 0.3 0.2];
color_fill = [0.89 0.94 0.9];

%xs = sort(x,'ascend');

covfunc = {'covSum',{'covMatern3iso','covNoise'}};
loghyper = minimize([-1;-1;-1], 'gpr', -100, covfunc, X, y);
[mu,s2] = gpr(loghyper,covfunc,X,y,Xtest);
LML = -gpr(loghyper,covfunc,X,y);

line(X(:,1),X(:,2),y,'LineStyle','none','Marker','.','MarkerFaceColor',[0.5 0.5 0.5],'MarkerEdgeColor',[0.5 0.5 0.5]);
hold on;
contour3(foo1,foo2,reshape(mu,[m,n]),15); colormap('jet');
h = findobj('Type','patch');
set(h,'LineWidth',2);
xlabel(x_str,'interpreter','none');
ylabel(y_str,'interpreter','none');
zlabel(z_str,'interpreter','none');
colorbar;
box on;
